<?php
/**
 * Created by PhpStorm.
 * User: yzr
 * Date: 1/27/2021
 * Time: 15:12
 */
namespace app\common\model\job;

use app\common\model\base\A3Mall;

class Requirement extends A3Mall
{
    protected $name = "job_requirement";

    protected $type = [
        "job_id"=>"integer",
        "requirement"=>"string",
        ];

    /**
     * 添加记录信息
     * @param $data
     * @return int|string
     */
    public function recordCreate($data) {
        $insertData = [];
        foreach($this->type as $key=>$type) {
            if(array_key_exists($key,$data)) {
                $insertData[$key] = $data[$key];
            }
        }
        return $this->insert($insertData);
    }
}
